package com.example.tapiossservice.Controller;

import com.example.tapiossservice.IService.ossService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import  com.example.tapiossservice.common.unifyDataForm.Result;

@RestController
@RequestMapping("/apiPublish")
@CrossOrigin
public class ossController {
    @Autowired
    com.example.tapiossservice.IService.ossService ossService;

    @PostMapping("/ossfile")
    public Result uploadFile(@RequestBody  MultipartFile file){

        String url = ossService.uploadFile(file);
        return Result.success(url);
    }


}
